package cn.cnhis.online.activity.loading.model;

import android.util.Log;

import java.util.Map;

import cn.cnhis.online.BuildConfig;
import cn.cnhis.online.activity.loading.contract.ILoadingContract;
import cn.cnhis.online.base.DefaultDisposablePoolImpl;
import cn.cnhis.online.mymodule.HttpController;
import io.reactivex.internal.observers.BlockingBaseObserver;

/**
 * @author 刘祥龙
 * @describe
 * @date 2020/3/3 0003  14:14
 * - generate by MvpAutoCodePlus plugin.
 */

public class LoadingModel extends DefaultDisposablePoolImpl implements ILoadingContract.Model {

    @Override
    public void getAppActiveMqInfo(ILoadingContract.View view) {
        HttpController.getAppActiveMqInfo(null, new BlockingBaseObserver<Map>() {
            @Override
            public void onNext(Map map) {
                view.getAppActiveMqInfo(map);
            }

            @Override
            public void onError(Throwable e) {
                if (BuildConfig.DEBUG) Log.d("LoadingModel", "e:" + e);
                view.showErr("服务异常请联系管理员！");
            }
        });
    }
}

